const path = require('path')

const {merge} = require('webpack-merge')

const eslintWebpackPlugin = require('eslint-webpack-plugin')

const base = require('./base')

module.exports = merge(base, {
  mode: 'development',
  devtool: 'inline-source-map',
  devServer: {
    // host: '10.36.138.16',
    port: '8088',
    open: true, //自动打开
    hot: true, //开启热加载
    contentBase: path.resolve(__dirname, '../public'), //指定静态资源的目录
    overlay: {
      error: true
    },
    proxy: {
      '/soso': {
        target: 'https://c.y.qq.com',
        changeOrigin: true
      }
    }

  },
  plugins: [
    new eslintWebpackPlugin({
      exclude: 'node_modules'
    })
  ],
  resolve: {
    alias: {
      'react': path.resolve(__dirname, '../node_modules/react/cjs/react.development.js')
    }
  }
})